var maxTime = 5*60; // seconds
var time = maxTime;
$('body').on('keydown mousemove mousedown', function(e) {
    time = maxTime; // reset
});
//创建一个定时器，以每秒一次执行里面的方法
var intervalId = setInterval(function() {
    time--;
    if (time <= 0) {
        ShowInvalidLoginMessage();
        //杀死定时器
        clearInterval(intervalId);
    }
}, 1000);
function ShowInvalidLoginMessage() {
    // window.location.href="${pageContext.request.contextPath}/user/toLoginPage";
    window.location.href = 'https://10.1.10.34:8443/EssSealPlatform/unit/login';
}